package interfaceDemo.Animal;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025/5/9
 * Time: 19:35
 */

public class Frog extends Animal implements Act{
    public Frog(String name) {
        super(name);
    }
    @Override
    public void run() {
        System.out.println(this.name + " is running");
    }
    @Override
    public void swim() {
        System.out.println(this.name + " is swimming");
    }
    public void act(){
        this.run();
        this.swim();
    }
}
